 /**
   *  Created by clz on
   *  Function:
   *  Desc:
   */
   import React,{Component} from 'react';
   import {View,StyleSheet,Text,Button,NativeModules,ToastAndroid,DeviceEventEmitter} from 'react-native';

   export default class VpTest extends Component {
    constructor(props) {
         super(props);
         this.state = {};
     }
    componentDidMount(){
        DeviceEventEmitter.addListener('onItemClick',(data)=>{
            ToastAndroid.show(data.position,300);
        })
    }
     render() {
         return (
             <View style={{flex:1,justifyContent:'center', alignItems:'center'}}>
                <Button title={'哈哈'} onPress={()=>{
                    NativeModules.vp.showDialog();
                }}/>
             </View>
         )
     }

   }
